package com.open.basic.anno;

import java.lang.annotation.*;


/**
 * @author: system
 * @Date: 2024/9/12 下午2:38
 * @Version: V1.0
 * @description: -> 限流
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface LimitRequest {

    String DEFAULT_LIMIT = "Token_Bucket";
    String LEAKAGE_BUCKET = "Leakage_Bucket";
    String REDIS = "redis";

    String type() default "local";

    /**
     * key
     * @return
     */
    String key() default "";

    /**
     * 每秒允许请求的次数
     * @return
     */
    int value() default 100;

    String userId() default "";

}
